package com.zixun.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

import com.zixun.Models.Message;
import com.zixun.R;
import com.zixun.db.DatabaseUtil;
import com.zixun.db.MyHelper;

import java.util.List;


/**
 * 郭郭
 */
public class HomeFragmentDetailActivity extends Activity {

    private TextView center_text;
    //private ImageView detail_img;
    private TextView detail_text;
    private TextView title_text;
    private String title;
    private String description;
    private String type;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.home_fragment_detail_layout);

        initView();
        initData();
    }

    private void initView() {
        center_text = (TextView) findViewById(R.id.center_text);
        title_text = (TextView) findViewById(R.id.title_text);
        detail_text = (TextView) findViewById(R.id.detail_text);
    }

    private void initData() {
        Intent intent = getIntent();
        title = intent.getStringExtra("title");
        description = intent.getStringExtra("description");
        type = intent.getStringExtra("type");
        switch (type) {
            case "growup":
                center_text.setText("成长发展");
                break;
            case "love":
                center_text.setText("婚恋问题");
                break;
            case "relationship":
                center_text.setText("人际关系");
                break;
            case "mentaldisorder":
                center_text.setText("心理障碍");
                break;

        }
        title_text.setText(title);
        detail_text.setText(description);
    }
}
